package com.mxchen.lottery.domain.strategy;

import com.mxchen.lottery.domain.strategy.model.AwardDetails;
import com.mxchen.lottery.domain.strategy.model.StrategyDetails;

import java.util.List;

/**
 * @author hmxchen
 */
public interface StrategyGateway {
    /**
     * TODO
     * 根据策略id获取策略详情
     * @param strategyId  策略ID
     * @return
     * @author: hmxchen
     * @date : 2021/12/14 10:39
     */
    StrategyDetails queryStrategyRich(Long strategyId);

    /**
     * TODO
     * 根据奖品id获取奖品详情
     * @param awardId  奖品ID
     * @return
     * @author: hmxchen
     * @date : 2021/12/14 10:39
    */
    AwardDetails queryAwardInfo(String awardId);
    /**
     * TODO
     * 获取无库存排除奖品列表ID集合
     * @param strategyId
     * @return
     * @author: hmxchen
     * @date : 2021/12/17 10:03
    */
    List<String> queryNoStockStrategyAwardList(Long strategyId);
    /**
     * 扣减库存
     * @param strategyId 策略ID
     * @param awardId    奖品ID
     * @return           扣减结果
     */
    boolean deductStock(Long strategyId, String awardId);
}
